﻿//using System.Collections.Generic;
//using Newtonsoft.Json;

//namespace UIOC.Editor {

//    internal sealed class AssemblyDefinition : IAssemblyDefinitionObject {

//        private AssemblyDefinitionObject m_Object;
//        private string m_AssetPath;

//        public AssemblyDefinition(AssemblyDefinitionObject @object, string assetPath) {
//            UnityEngine.Assertions.Assert.IsNotNull(@object);
//            UnityEngine.Assertions.Assert.IsNotNull(assetPath);

//            m_Object = @object;
//            m_AssetPath = assetPath;
//        }

//        public string AssetPath => m_AssetPath;

//        public bool AllowUnsafeCode => m_Object.AllowUnsafeCode;

//        public bool AutoReferenced => m_Object.AutoReferenced;

//        public IReadOnlyList<string> DefineConstraints => m_Object.DefineConstraints;

//        public IReadOnlyList<string> IncludePlatforms => m_Object.IncludePlatforms;

//        public AssemblyDefinitionName Name => m_Object.Name;

//        public bool NoEngineReferences => m_Object.NoEngineReferences;

//        public bool OverrideReferences => m_Object.OverrideReferences;

//        public IReadOnlyList<string> PrecompiledReferences => m_Object.PrecompiledReferences;

//        public IReadOnlyList<string> References => m_Object.References;

//        public string RootNamespace => m_Object.RootNamespace;

//        public IReadOnlyList<AssemblyDefinitionObject.VersionDefine> VersionDefines => m_Object.VersionDefines;
//    }

//    internal interface IAssemblyDefinitionObject {
//        bool AllowUnsafeCode { get; }
//        bool AutoReferenced { get; }
//        IReadOnlyList<string> DefineConstraints { get; }
//        IReadOnlyList<string> IncludePlatforms { get; }
//        AssemblyDefinitionName Name { get; }
//        bool NoEngineReferences { get; }
//        bool OverrideReferences { get; }
//        IReadOnlyList<string> PrecompiledReferences { get; }
//        IReadOnlyList<string> References { get; }
//        string RootNamespace { get; }
//        IReadOnlyList<AssemblyDefinitionObject.VersionDefine> VersionDefines { get; }
//    }

//    [JsonObject(MemberSerialization.OptIn)]
//    internal sealed class AssemblyDefinitionObject : IAssemblyDefinitionObject {

//        [JsonObject(MemberSerialization.OptIn)]
//        internal sealed class VersionDefine {

//            [JsonProperty(propertyName: "name")]
//            private readonly string m_Name;
//            public string Name => m_Name;

//            [JsonProperty(propertyName: "expression")]
//            private readonly string m_Expression;
//            public string Expression => m_Expression;

//            [JsonProperty(propertyName: "define")]
//            private readonly string m_Define;
//            public string Define => m_Define;
//        }

//        [JsonProperty(propertyName: "name")]
//        private readonly string m_Name;
//        public AssemblyDefinitionName Name => new() { Value = m_Name };

//        [JsonProperty(propertyName: "rootNamespace")]
//        private readonly string m_RootNamespace;
//        public string RootNamespace => m_RootNamespace;

//        [JsonProperty(propertyName: "references")]
//        private readonly string[] m_References;
//        public IReadOnlyList<string> References => m_References;

//        [JsonProperty(propertyName: "includePlatforms")]
//        private readonly string[] m_IncludePlatforms;
//        public IReadOnlyList<string> IncludePlatforms => m_IncludePlatforms;

//        [JsonProperty(propertyName: "allowUnsafeCode")]
//        private readonly bool m_AllowUnsafeCode;
//        public bool AllowUnsafeCode => m_AllowUnsafeCode;

//        [JsonProperty(propertyName: "overrideReferences")]
//        private readonly bool m_OverrideReferences;
//        public bool OverrideReferences => m_OverrideReferences;

//        [JsonProperty(propertyName: "precompiledReferences")]
//        private readonly string[] m_PrecompiledReferences;
//        public IReadOnlyList<string> PrecompiledReferences => m_PrecompiledReferences;

//        [JsonProperty(propertyName: "autoReferenced")]
//        private readonly bool m_AutoReferenced;
//        public bool AutoReferenced => m_AutoReferenced;

//        [JsonProperty(propertyName: "defineConstraints")]
//        private readonly string[] m_DefineConstraints;
//        public IReadOnlyList<string> DefineConstraints => m_DefineConstraints;

//        [JsonProperty(propertyName: "versionDefines")]
//        private readonly VersionDefine[] m_VersionDefines;
//        public IReadOnlyList<VersionDefine> VersionDefines => m_VersionDefines;

//        [JsonProperty(propertyName: "noEngineReferences")]
//        private readonly bool m_noEngineReferences;
//        public bool NoEngineReferences => m_noEngineReferences;
//    }
//}